#include <stdio.h>
#include <stdlib.h>
#include "math_calculator.h"
int calculate(operation,i,j)
{
	
}
int main(void)
{
	int operation,i,j,result;
	char op;
	while(1){
	printf("***********Menu*************\n");
	printf("**  1 : Addition          **\n");
	printf("**  2 : Minus             **\n");
	printf("**  3 : Multiplication    **\n");
	printf("**  4 : Division          **\n");
	printf("**  5 : Quit              **\n");
	printf("Please input your operation:");
	scanf("%d",&operation);
	if(operation == 5)
	{	
		printf("Bye~~\n");
		exit(0);
	}
	else if(operation < 1 || operation > 4)
	{
		printf("incorrect operation\n");
		getchar();
		continue;
	}
	getchar();
	printf("Please input your parameter:");
	scanf("%d %d",&i,&j);
	switch(operation)
	{
		case 1:		
			result = additive(i,j);
			op = '+';
			break;
		case 2:		
			result = minus(i,j);
			op = '-';
			break;
		case 3:		
			result = multiply(i,j);
			op = '*';
			break;
		case 4:		
			result = divide(i,j);
			op = '%';
			break;
		case 5:	
			printf("Bye~~\n");
			exit(0);
			break;
		default :
			printf("operation is incorrect\n");
			break;
	}
	printf("result : %d %c %d = %d\n",i,op,j,result);
	}
	return 0;
}
